﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Business.Migrations
{
    public partial class demo11 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<Guid>(
                name: "BorrowId",
                table: "RGoods",
                type: "uniqueidentifier",
                nullable: false,
                defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));

            migrationBuilder.CreateTable(
                name: "SendDetail",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    DName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    DNum = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DKNum = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DPrice = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    DPNum = table.Column<int>(type: "int", nullable: false),
                    DPH = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    STime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SATime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SGTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SPage = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SDesc = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SIsta = table.Column<bool>(type: "bit", nullable: false),
                    SendGId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    SendInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SendDetail", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "SendG",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    STitle = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SNum = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    STime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    APeo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProPeo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RPeo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RAdss = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Phone = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProKeepId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SendG", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "SendInfo",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    SIPeo = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SITime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SStyle = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SCom = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SQNum = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SPrice = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    SDesc = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SendInfo", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "SendDetail");

            migrationBuilder.DropTable(
                name: "SendG");

            migrationBuilder.DropTable(
                name: "SendInfo");

            migrationBuilder.DropColumn(
                name: "BorrowId",
                table: "RGoods");
        }
    }
}
